﻿using System.Collections.ObjectModel;
using System.Xml.Serialization;

namespace Renci.Data.Interop.OpenGIS.Wfs
{
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.opengis.net/wfs")]
    [System.Xml.Serialization.XmlRootAttribute("LockFeature", Namespace = "http://www.opengis.net/wfs", IsNullable = false)]
    public class LockFeatureType : BaseRequestType
    {
        /// <summary>
        /// Creates a default instance of <see cref="LockFeatureType"/>.
        /// </summary>
        public LockFeatureType()
        {
            this.Expiry = "5";
            this.LockAction = AllSomeType.All;

            this.Xmlns = new XmlSerializerNamespaces();
            this.Xmlns.Add("ows", "http://www.opengis.net/ows");
            this.Xmlns.Add("ogc", "http://www.opengis.net/ogc");
            this.Xmlns.Add("wfs", "http://www.opengis.net/wfs");
            this.Xmlns.Add("gml", "http://www.opengis.net/gml");
            this.Xmlns.Add("xlink", "http://www.w3.org/1999/xlink");
            this.Xmlns.Add("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        }

        /// <summary>
        /// Gets or sets prefix association with namespaces that are used object serializer.
        /// </summary>
        [XmlNamespaceDeclarations]
        public XmlSerializerNamespaces Xmlns { get; set; }

        private Collection<LockType> _locks = new Collection<LockType>();
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("Lock")]
        public Collection<LockType> Locks
        {
            get
            {
                return this._locks;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute("expiry", DataType = "positiveInteger")]
        [System.ComponentModel.DefaultValueAttribute("5")]
        public string Expiry { get; set; }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute("lockAction")]
        [System.ComponentModel.DefaultValueAttribute(AllSomeType.All)]
        public AllSomeType LockAction { get; set; }
    }
}
